---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[16], line 4
      2 cases = ['Total Cases', 'Total Deaths', 'Total Recovered', 'Active Cases']
      3 for case in cases:
----> 4     fig = ex.pie(worldometer_data[0:15],values=case,names=labels,hole=0.3,title='{}: worst 15 affected countries'.format(case))
      5     fig.show()

File ~/anaconda3/lib/python3.12/site-packages/plotly/express/_chart_types.py:1629, in pie(data_frame, names, values, color, facet_row, facet_col, facet_col_wrap, facet_row_spacing, facet_col_spacing, color_discrete_sequence, color_discrete_map, hover_name, hover_data, custom_data, category_orders, labels, title, template, width, height, opacity, hole)
   1627 else:
   1628     layout_patch = {}
-> 1629 return make_figure(
   1630     args=locals(),
   1631     constructor=go.Pie,
   1632     trace_patch=dict(showlegend=(names is not None), hole=hole),
   1633     layout_patch=layout_patch,
   1634 )

File ~/anaconda3/lib/python3.12/site-packages/plotly/express/_core.py:2117, in make_figure(args, constructor, trace_patch, layout_patch)
   2114 layout_patch = layout_patch or {}
   2115 apply_default_cascade(args)
-> 2117 args = build_dataframe(args, constructor)
   2118 if constructor in [go.Treemap, go.Sunburst, go.Icicle] and args["path"] is not None:
   2119     args = process_dataframe_hierarchy(args)

File ~/anaconda3/lib/python3.12/site-packages/plotly/express/_core.py:1513, in build_dataframe(args, constructor)
   1510     args["color"] = None
   1511 # now that things have been prepped, we do the systematic rewriting of `args`
-> 1513 df_output, wide_id_vars = process_args_into_dataframe(
   1514     args, wide_mode, var_name, value_name
   1515 )
   1517 # now that `df_output` exists and `args` contains only references, we complete
   1518 # the special-case and wide-mode handling by further rewriting args and/or mutating
   1519 # df_output
   1521 count_name = _escape_col_name(df_output, "count", [var_name, value_name])

File ~/anaconda3/lib/python3.12/site-packages/plotly/express/_core.py:1234, in process_args_into_dataframe(args, wide_mode, var_name, value_name)
   1232         if argument == "index":
   1233             err_msg += "\n To use the index, pass it in directly as `df.index`."
-> 1234         raise ValueError(err_msg)
   1235 elif length and len(df_input[argument]) != length:
   1236     raise ValueError(
   1237         "All arguments should have the same length. "
   1238         "The length of column argument `df[%s]` is %d, whereas the "
   (...)
   1245         )
   1246     )

ValueError: Value of 'values' is not the name of a column in 'data_frame'. Expected one of ['Country/Region', 'Continent', 'Population', 'TotalCases', 'NewCases', 'TotalDeaths', 'NewDeaths', 'TotalRecovered', 'NewRecovered', 'ActiveCases', 'Serious,Critical', 'Tot Cases/1M pop', 'Deaths/1M pop', 'TotalTests', 'Tests/1M pop', 'WHO Region'] but received: Total Cases